Comments (7)
Hi @beamercola!
Thanks so much for getting in touch. It is possible to update metadata on identity objects. I'm not quite sure why it doesn't work for you, though. Can you please share the code snippet you use to update the metadata?
Cheers,
Benedikt
from layer-ruby.
Great thanks!
So by default identity.metadata
returns nil
so setting identity.metadata = {a: "b"}; identity.save
It sounds like it's writing the whole metadata object and not patching existing?
Thanks again, lemme know if there's anything else I can provide
from layer-ruby.
Keep messing with it and can't seem to find anything that works
from layer-ruby.
@beamercola You're right. It's a bug. I'll see what I can do to fix it.
from layer-ruby.
Hi @beamercola,
I just pushed a potential fix to the identity-metadata
branch. Can you please check if it fixes your issue?
Use this line in your Gemfile
to use the version from the branch:
gem 'layer-ruby', github: 'benedikt/layer-ruby', branch: 'identity-metadata'
Afterwards, these operations should work as expected:
identity.metadata = { foo: 'bar' }
identity.metadata['bar'] = 'baz'
Replacing the whole object will not work, though. I changed the #metadata=
setter to simply set all key value pairs on the existing metadata object.
Please let me know if this fixes your issues.
from layer-ruby.
Works great! You're the most attentive developer out there - keep up the awesome work.
Thank you.
from layer-ruby.
Thank you, @beamercola 😄
I just released this fix as v0.7.2 on RubyGems. So you can now switch back to loading the gem from there.
from layer-ruby.
Related Issues (17)
- support for new format for Application's IDs HOT 1
- 422 Unprocessable Entity HOT 2
- Get messages in conversation HOT 7
- undefined method `participants=' for #<Layer::Conversation:0x00000007e31d20> HOT 2
- NoMethodError: private method `include' called for #<Class:#<Layer::RelationProxy:0x007fd1f67016e0>> HOT 2
- sending custom payload returns 422 error HOT 9
- new uninitialised constant error in latest code HOT 2
- 404 Resource Not Found for every request HOT 11
- How to get messages in a conversation HOT 3
- Error on conversation creation/save HOT 1
- Store status when creating distinct conversation HOT 1
- set custom If-None-Match header HOT 3
- InvalidHeader on Layer::Client.authenticate HOT 3
- 2.0 API HOT 3
- [Question]: Using this gem for Client API Proxy? HOT 6
- Could not find conversation error recently started (last 2 days)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from layer-ruby.